# 在包中创建的.py文件就是Python中的模块

word = "this is mode A"


def hello():
    print("this is modeA's hello function")


def hello_main():
    print("this is modeA's hello_main function")


class Mode:
    def __init__(self, info="默认值"):
        self.info = info

    def mode_print(self):
        print("info:{}".format(self.info))

    def __del__(self):
        print("对象已经消亡...")


# if main函数中的代码块 会在模块执行时被执行
if __name__ == '__main__':
    hello_main()

# else 表示当ModeA被调用时会被执行
else:
    print("当前模块会执行初始化操作...")
    hello()
